﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GmFamilyService.h"
#include "IFamilyEntity.h"
#include "FamilyConnectorTypeAndShape.h"

namespace gfam
{ 


    /// \brief 连接件基类
    class GM_FAMILY_SERVICE_EXPORT IFamilyConnector : public gfam::IFamilyEntity
    {
        DEFINE_CAST_DERIVED(gfam::IFamilyConnector, gfam::IFamilyEntity)

    public:

        /// \brief 获取连接件id
        /// 
        /// \return 连接件id
        virtual const Int32 GetConnectionId() const = 0;

        /// \brief 设置连接件id
        /// 
        /// \param connectionId 连接件id
        virtual void SetConnectionId(Int32 connectionId) = 0;

        /// \brief 获取连接件形状
        /// 
        /// \return 连接件形状
        virtual const IFamilyConnectorShape* GetConnectorShape() const = 0;

        /// \brief 设置连接件形状
        /// 
        /// \param connectorShape 连接件形状
        virtual void SetConnectorShape(gcmp::OwnerPtr<IFamilyConnectorShape> connectorShape) = 0;

        /// \brief 获取连接件类型Id
        /// 
        /// \return 连接件类型Id
        virtual Int32 GetFamilyConnectorTypeId() const = 0;

        /// \brief 设置连接件类型Id
        /// 
        /// \param connectorType 连接件类型Id
        virtual void SetFamilyConnectorTypeId(Int32 connectorTypeId) = 0;

        /// \brief 获取连接件坐标系
        /// 
        /// \return 连接件坐标系
        virtual gcmp::Coordinate3d GetCoordinate() const = 0;

        /// \brief 获取Implementation Uid
        ///
        /// \return UniIdentity 返回ImplementationUid
        static gcmp::UniIdentity GetImplementationUid();

    };

} 
